<div class="article-title-gap">
    <h2 class="article-title">
        落笔文章
    </h2>
</div>
<div class="article-list--compact links">
    {{ range $i, $link := .Params.links }}
        <article>
            <a href="{{ $link.website }}" target="_blank" rel="noopener">
                <div class="article-details">
                    <h2 class="article-title">
                        {{- $link.title -}}
                    </h2>
                    <footer class="article-time">
                        {{ with $link.description }}
                            {{ . }}
                        {{ else }}
                            {{ $link.website }}
                        {{ end }}
                    </footer>
                </div>

                {{ with $link.image }}
                    {{ $permalink := . }}
                    {{ with ($.Resources.GetMatch (printf "%s" (. | safeURL))) }}
                        {{ $permalink = .RelPermalink }}
                    {{ end }}
                    <div class="article-image">
                        <img src="{{ $permalink }}" loading="lazy">
                    </div>
                {{ end }}
            </a>
        </article>
    {{ end }}
</div>

<div class="article-title-gap">
    <h2 class="article-title">
        短视频 · 直播
    </h2>
</div>
<div class="article-list--compact links">
    {{ range $i, $link := .Params.linksVideo }}
    <article>
        <a href="{{ $link.website }}" target="_blank" rel="noopener">
            <div class="article-details">
                <h2 class="article-title">
                    {{- $link.title -}}
                </h2>
                <footer class="article-time">
                    {{ with $link.description }}
                    {{ . }}
                    {{ else }}
                    {{ $link.website }}
                    {{ end }}
                </footer>
            </div>

            {{ with $link.image }}
            {{ $permalink := . }}
            {{ with ($.Resources.GetMatch (printf "%s" (. | safeURL))) }}
            {{ $permalink = .RelPermalink }}
            {{ end }}
            <div class="article-image">
                <img src="{{ $permalink }}" loading="lazy">
            </div>
            {{ end }}
        </a>
    </article>
    {{ end }}
</div>

<div class="article-title-gap">
    <h2 class="article-title">
        聆听灵说
    </h2>
</div>
<div class="article-list--compact links">
    {{ range $i, $link := .Params.linksAudio }}
    <article>
        <a href="{{ $link.website }}" target="_blank" rel="noopener">
            <div class="article-details">
                <h2 class="article-title">
                    {{- $link.title -}}
                </h2>
                <footer class="article-time">
                    {{ with $link.description }}
                    {{ . }}
                    {{ else }}
                    {{ $link.website }}
                    {{ end }}
                </footer>
            </div>

            {{ with $link.image }}
            {{ $permalink := . }}
            {{ with ($.Resources.GetMatch (printf "%s" (. | safeURL))) }}
            {{ $permalink = .RelPermalink }}
            {{ end }}
            <div class="article-image">
                <img src="{{ $permalink }}" loading="lazy">
            </div>
            {{ end }}
        </a>
    </article>
    {{ end }}
</div>